/**  
 * All rights Reserved, Designed By www.woniuxy.com
 * @Title:  Account.java   
 * @Package com.woniu.domain   
 * @Description:    Description  
 * @author: 蜗牛学院  
 * @date:   2019年8月1日 上午9:44:03
 * @user:   Administrator  
 * @version V1.0 
 * @Copyright: 2019 www.woniuxy.com Inc. All rights reserved. 
 * 注意：本内容仅限于成都蜗牛创想科技有限公司，禁止外泄以及用于其他的商业目
 */ 
package com.woniu.service.bo;

import java.util.List;

import com.woniu.domain.Category;
import com.woniu.domain.Goods;

/**
 * @author Administrator
 *
 */
public class PageBean {
	private Category category;
	private int currentPage;//当前页
	private int pageSize;//每页显示数据数
	private int totalSize;//总条数
	private int totalPage;//总页数
	private int start;//分页显示的页数开始
	private int end;//分页显示的页数结束
	private List<Goods> goodsList;//
	/**
	 * @return the category
	 */
	public Category getCategory() {
		return category;
	}
	/**
	 * @return the pageSize
	 */
	public int getPageSize() {
		return pageSize;
	}
	/**
	 * @param pageSize the pageSize to set
	 */
	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}
	/**
	 * @param category the category to set
	 */
	public void setCategory(Category category) {
		this.category = category;
	}
	/**
	 * @return the currentPage
	 */
	public int getCurrentPage() {
		return currentPage;
	}
	/**
	 * @param currentPage the currentPage to set
	 */
	public void setCurrentPage(int currentPage) {
		this.currentPage = currentPage;
	}
	/**
	 * @return the totalSize
	 */
	public int getTotalSize() {
		return totalSize;
	}
	/**
	 * @param totalSize the totalSize to set
	 */
	public void setTotalSize(int totalSize) {
		this.totalSize = totalSize;
	}
	/**
	 * @return the totalPage
	 */
	public int getTotalPage() {
		return totalPage;
	}
	/**
	 * @param totalPage the totalPage to set
	 */
	public void setTotalPage(int totalPage) {
		this.totalPage = totalPage;
	}
	/**
	 * @return the start
	 */
	public int getStart() {
		return start;
	}
	/**
	 * @param start the start to set
	 */
	public void setStart(int start) {
		this.start = start;
	}
	/**
	 * @return the end
	 */
	public int getEnd() {
		return end;
	}
	/**
	 * @param end the end to set
	 */
	public void setEnd(int end) {
		this.end = end;
	}
	/**
	 * @return the goodsList
	 */
	public List<Goods> getGoodsList() {
		return goodsList;
	}
	/**
	 * @param goodsList the goodsList to set
	 */
	public void setGoodsList(List<Goods> goodsList) {
		this.goodsList = goodsList;
	}
	@Override
	public String toString() {
		return "PageBean [category=" + category + ", currentPage=" + currentPage + ", pageSize=" + pageSize
				+ ", totalSize=" + totalSize + ", totalPage=" + totalPage + ", start=" + start + ", end=" + end
				+ ", goodsList=" + goodsList + "]";
	}
	public PageBean(Category category, int currentPage, int pageSize, int totalSize, int totalPage, int start, int end,
			List<Goods> goodsList) {
		super();
		this.category = category;
		this.currentPage = currentPage;
		this.pageSize = pageSize;
		this.totalSize = totalSize;
		this.totalPage = totalPage;
		this.start = start;
		this.end = end;
		this.goodsList = goodsList;
	}
	public PageBean() {
		super();
	}
//	public PageBean(int totalPage,int currentPage) {
//		if(totalPage <=5){
//            //总页数都小于5，那么end就为总页数的值了。
//            this.end = this.totalPage;
//        }else{
//            //总页数大于5，那么就要根据当前是第几页，来判断start和end为多少了，
//            this.start = currentPage - 2;
//            this.end = currentPage + 2;
//             
//            if(start < 0){
//                //比如当前页是第1页，或者第2页，那么就不如和这个规则，
//                this.start = 1;
//                this.end = 5;
//            }
//            if(end > this.totalPage){
//                //比如当前页是倒数第2页或者最后一页，也同样不符合上面这个规则
//                this.end = totalPage;
//                this.start = end - 5;
//            }
//        }
//	}
}
